package me.kafeitu.activiti.chapter5.identity;

import static org.junit.Assert.assertEquals;

import java.util.List;

import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.User;
import org.junit.Test;

import me.kafeitu.activiti.AbstractTestMysql;

/**
 * 删除用户和组
 * @author luodan
 *
 */
public class IdentityServiceClean extends AbstractTestMysql{

    /**
     * clean user and group
     */
    //@Test
    public void testDelete() throws Exception {
        identityService.deleteMembership("henryyan", "deptLeader");
        identityService.deleteGroup("deptLeader");
        identityService.deleteUser("henryyan");
        
        List<User> list= identityService.createUserQuery().list();
        logger.info("list.size=" + list.size());
    }
    
    @Test
    public void testDeleteUser() throws Exception {
        identityService.deleteUser("henryyan");
        identityService.deleteUser("jackchen");
    }
}
